package com.example.libpro.MyActivity.adminAdapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.libpro.DBEntity.BookEntity;
import com.example.libpro.R;

import java.util.List;

public class searchBookAdapter extends BaseQuickAdapter<BookEntity,BaseViewHolder>{
    public searchBookAdapter(List<BookEntity> data) {
        super(R.layout.admin_search_book_item, data);
    }
    @Override
    protected void convert(BaseViewHolder holder, BookEntity item) {
        holder.setText(R.id.bookName,item.getBookName())
                .setText(R.id.bookAuthor,item.getAuthor())
                .setText(R.id.bookNum,item.getTotalCount().toString());
        addChildClickViewIds(R.id.itembook);
    }
}
